package com.ai.study.components.swagger;

import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 每个组件模块下都可以自定义此config，注意@Configuration名称不要相同
 * @author 陈威
 * @since 2025-05-27
 */
@Configuration
public class Knife4jConfiguration {

    @Bean
    public GroupedOpenApi selectSwagger3Docket1() {
        return  GroupedOpenApi.builder()
                .group("chatClient")
                .packagesToScan("com.ai.study.dashscope.controller.chatClient")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket2() {
        return  GroupedOpenApi.builder()
                .group("chatModel")
                .packagesToScan("com.ai.study.dashscope.controller.chatModel")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket3() {
        return  GroupedOpenApi.builder()
                .group("chatMemory")
                .packagesToScan("com.ai.study.dashscope.controller.chatMemory")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket4() {
        return  GroupedOpenApi.builder()
                .group("prompt")
                .packagesToScan("com.ai.study.dashscope.controller.prompt")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket5() {
        return  GroupedOpenApi.builder()
                .group("image")
                .packagesToScan("com.ai.study.dashscope.controller.image")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket6() {
        return  GroupedOpenApi.builder()
                .group("multiModel")
                .packagesToScan("com.ai.study.dashscope.controller.multiModel")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket7() {
        return  GroupedOpenApi.builder()
                .group("rag")
                .packagesToScan("com.ai.study.dashscope.controller.rag")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket8() {
        return  GroupedOpenApi.builder()
                .group("structured")
                .packagesToScan("com.ai.study.dashscope.controller.structured")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket9() {
        return  GroupedOpenApi.builder()
                .group("audio")
                .packagesToScan("com.ai.study.dashscope.controller.audio")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket10() {
        return  GroupedOpenApi.builder()
                .group("摘要生成")
                .packagesToScan("com.ai.study.dashscope.controller.graph")
                .build();
    }

    @Bean
    public GroupedOpenApi selectSwagger3Docket11112() {
        return  GroupedOpenApi.builder()
                .group("ollama AI")
                .packagesToScan("com.ai.study.ollama")
                .build();
    }
}
